<div class="groups view">
	<h2><?php  echo __d('groups','Group');?></h2>
	<div class="actions selected">
		<?php echo $this->Html->link(__d('groups','Edit Group'), array('action' => 'edit', $group['Group']['id'])); ?>
		<?php echo $this->Form->postLink(__d('groups','Delete Group'), array('action' => 'delete', $group['Group']['id']), null, __d('groups','Are you sure you want to delete # %s?', $group['Group']['id'])); ?>
	</div>
	<div class="clear"></div>
	<dl>
		<dt><?php echo __d('groups','Id'); ?></dt>
		<dd>
			<?php echo h($group['Group']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __d('groups','Name'); ?></dt>
		<dd>
			<?php echo h($group['Group']['name']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __d('groups','Created'); ?></dt>
		<dd>
			<?php echo h($group['Group']['created']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __d('groups','Modified'); ?></dt>
		<dd>
			<?php echo h($group['Group']['modified']); ?>
			&nbsp;
		</dd>
	</dl>

	<div class="related">
		<h3><?php echo __d('groups','Related Users');?></h3>
		<?php if (!empty($group['User'])):?>
		<table cellpadding = "0" cellspacing = "0">
		<tr>
			<th><?php echo __d('groups','Id'); ?></th>
			<th><?php echo __d('groups','Username'); ?></th>
			<th><?php echo __d('groups','Email'); ?></th>
			<th><?php echo __d('groups','First Name'); ?></th>
			<th><?php echo __d('groups','Last Name'); ?></th>
			<th><?php echo __d('groups','Group Id'); ?></th>
			<th class="actions"><?php echo $this->Html->link(__d('groups','New User'), array('controller' => 'users', 'action' => 'add'));?></th>
		</tr>
		<?php
			$i = 0;
			foreach ($group['User'] as $user): ?>
			<tr>
				<td><?php echo $user['id'];?></td>
				<td><?php echo $user['username'];?></td>
				<td><?php echo $user['email'];?></td>
				<td><?php echo $user['first_name'];?></td>
				<td><?php echo $user['last_name'];?></td>
				<td><?php echo $user['group_id'];?></td>
				<td class="actions">
					<?php echo $this->Html->link(__d('groups','View'), array('controller' => 'users', 'action' => 'view', $user['id'])); ?>
					<?php echo $this->Html->link(__d('groups','Edit'), array('controller' => 'users', 'action' => 'edit', $user['id'])); ?>
					<?php echo $this->Form->postLink(__d('groups','Delete'), array('controller' => 'users', 'action' => 'delete', $user['id']), null, __d('groups','Are you sure you want to delete # %s?', $user['id'])); ?>
				</td>
			</tr>
		<?php endforeach; ?>
		</table>
	<?php endif; ?>

	</div>
</div>
<?php echo $this->element('/menu/left')?>